home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11875 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: pointers and functions
  5. Date: Wed, 27 Mar 96 00:58:51 GMT
  6. Organization: none
  7. Message-ID: <827888331snz@genesis.demon.co.uk>
  8. References: <4j6dol$58g@news.bu.edu> <4j8iqs$9n9@mozo.cc.purdue.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4j8iqs$9n9@mozo.cc.purdue.edu>
  15.            pacman@hillres151.cc.purdue.edu "PacMan" writes:
  16.  
  17. >The problem is that Maze is a local variable. It only exists inside the
  18. >function readMaze. When you return its address, readMaze is finished, and its
  19. >local variables disappear, and the calling function is left with a pointer to
  20. >some data that isn't there anymore. After that, anything can happen-- bus
  21. >errors, segmentation faults, the end of the universe...
  22.  
  23. Nostradamus was a C programmer.
  24.  
  25. -- 
  26. -----------------------------------------
  27. Lawrence Kirby | fred@genesis.demon.co.uk
  28. Wilts, England | 70734.126@compuserve.com
  29. -----------------------------------------
  30.